package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.OliveAssetsScrapMapper;
import com.ruoyi.system.domain.OliveAssetsScrap;
import com.ruoyi.system.service.IOliveAssetsScrapService;

/**
 * 资产报废Service业务层处理
 * 
 * @author hzl
 * @date 2025-03-24
 */
@Service
public class OliveAssetsScrapServiceImpl implements IOliveAssetsScrapService 
{
    @Autowired
    private OliveAssetsScrapMapper oliveAssetsScrapMapper;

    /**
     * 查询资产报废
     * 
     * @param assetId 资产报废主键
     * @return 资产报废
     */
    @Override
    public OliveAssetsScrap selectOliveAssetsScrapByAssetId(String assetId)
    {
        return oliveAssetsScrapMapper.selectOliveAssetsScrapByAssetId(assetId);
    }

    /**
     * 查询资产报废列表
     * 
     * @param oliveAssetsScrap 资产报废
     * @return 资产报废
     */
    @Override
    public List<OliveAssetsScrap> selectOliveAssetsScrapList(OliveAssetsScrap oliveAssetsScrap)
    {
        return oliveAssetsScrapMapper.selectOliveAssetsScrapList(oliveAssetsScrap);
    }

    /**
     * 新增资产报废
     * 
     * @param oliveAssetsScrap 资产报废
     * @return 结果
     */
    @Override
    public int insertOliveAssetsScrap(OliveAssetsScrap oliveAssetsScrap)
    {
        return oliveAssetsScrapMapper.insertOliveAssetsScrap(oliveAssetsScrap);
    }

    /**
     * 修改资产报废
     * 
     * @param oliveAssetsScrap 资产报废
     * @return 结果
     */
    @Override
    public int updateOliveAssetsScrap(OliveAssetsScrap oliveAssetsScrap)
    {
        return oliveAssetsScrapMapper.updateOliveAssetsScrap(oliveAssetsScrap);
    }

    /**
     * 批量删除资产报废
     * 
     * @param assetIds 需要删除的资产报废主键
     * @return 结果
     */
    @Override
    public int deleteOliveAssetsScrapByAssetIds(String[] assetIds)
    {
        return oliveAssetsScrapMapper.deleteOliveAssetsScrapByAssetIds(assetIds);
    }

    /**
     * 删除资产报废信息
     * 
     * @param assetId 资产报废主键
     * @return 结果
     */
    @Override
    public int deleteOliveAssetsScrapByAssetId(String assetId)
    {
        return oliveAssetsScrapMapper.deleteOliveAssetsScrapByAssetId(assetId);
    }
}
